<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>XRay扫描</title>
    <#include "/manage/header.html"/>
    <script>
        $(function () {
            $("#scan").click(function () {
                var url = $("#url").val();
                var plugins = [];

                $.each($('input:checkbox:checked'),function(){
                    plugins.push($(this).val())
                });
                if(!plugins || plugins.length ==0){
                    $("#outlog").append("[-]请选择至少一个插件\r\n")
                    return;
                }

                $("#outlog").append("[!]正在发起扫描请求...\r\n")
                $.post(
                    "scan",
                    {
                        url:url,
                        plugins:plugins.join(",")
                    },
                    function (e) {
                        $("#outlog").append("\r\n===================\r\n")

                        $("#outlog").append(e)

                        $("#outlog").append("\r\n===================\r\n")
                    }
                )
            })
        })

    </script>
</head>

<body>

<!--<div class="card">
    <div class="card-body">
        <div class="row">
            <div class="col-md-6">

                <div class="form-group mb-3">
                    <label for="url">URL</label>
                    <input type="text" id="url" class="form-control">
                </div>

                <h4 class="header-title mt-5 mt-sm-0">插件</h4>
                <div class="mt-3">
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="sqldet" value="sqldet">
                        <label class="custom-control-label" for="sqldet">SQL 注入检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="cmd_injection" value="cmd_injection">
                        <label class="custom-control-label" for="cmd_injection">命令/代码注入检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="dirscan" value="dirscan">
                        <label class="custom-control-label" for="dirscan">目录枚举</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="path_traversal" value="path_traversal">
                        <label class="custom-control-label" for="path_traversal">路径穿越检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="xxe" value="xxe">
                        <label class="custom-control-label" for="xxe">XML 实体注入检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="phantasm" value="phantasm">
                        <label class="custom-control-label" for="phantasm">POC 检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="upload" value="upload">
                        <label class="custom-control-label" for="upload">文件上传检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="brute_force" value="brute_force">
                        <label class="custom-control-label" for="brute_force">弱口令检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="jsonp" value="jsonp">
                        <label class="custom-control-label" for="jsonp">jsonp 检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="ssrf" value="ssrf">
                        <label class="custom-control-label" for="ssrf">ssrf 检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="baseline" value="baseline">
                        <label class="custom-control-label" for="baseline">基线检查</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="redirect" value="redirect">
                        <label class="custom-control-label" for="redirect">任意跳转检测</label>
                    </div>
                    <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="crlf_injection" value="crlf_injection">
                        <label class="custom-control-label" for="crlf_injection">CRLF 注入</label>
                    </div>
                </div>

                <button type="button" id="scan" class="btn btn-primary">扫描</button>
            </div> &lt;!&ndash; end col &ndash;&gt;

            <div class="col-md-6">
                <div class="form-group mb-3">
                    <label for="outlog">输出日志</label>
                    <textarea class="form-control" id="outlog" rows="18"></textarea>
                </div>
            </div> &lt;!&ndash; end col &ndash;&gt;
        </div> &lt;!&ndash; end row &ndash;&gt;

    </div> &lt;!&ndash; end card-body&ndash;&gt;
</div>-->

<div class="card">
    <div class="card-body">

        <div class="row">
            <!-- end col -->

            <div class="col-xl-12">
                <div class="card">
                    <div class="card-body">

                        <ul class="nav nav-pills bg-nav-pills nav-justified mb-3">
                            <li class="nav-item">
                                <a href="#index" onclick="location.href='index'" data-toggle="tab" aria-expanded="true" class="nav-link rounded-0 active">
                                    <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                                    <span class="d-none d-lg-block">单个网址扫描</span>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="#passive" onclick="location.href='passive'" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                                    <i class="mdi mdi-account-circle d-lg-none d-block mr-1"></i>
                                    <span class="d-none d-lg-block">扫描报告</span>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="#crawler" onclick="location.href='crawler'"  data-toggle="tab" aria-expanded="false" class="nav-link rounded-0 ">
                                    <i class="mdi mdi-settings-outline d-lg-none d-block mr-1"></i>
                                    <span class="d-none d-lg-block">爬虫扫描</span>
                                </a>
                            </li>
                        </ul>

                        <div class="tab-content">
                            <div class="tab-pane active" id="index">
                                <div class="form-group mb-3">
                                    <label for="url">URL</label>
                                    <input type="text" id="url" class="form-control">
                                </div>
                                <h4 class="header-title mt-5 mt-sm-0">插件</h4>
                                <div class="mt-3">
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="sqldet" value="sqldet">
                                        <label class="custom-control-label" for="sqldet">SQL 注入检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="cmd_injection" value="cmd_injection">
                                        <label class="custom-control-label" for="cmd_injection">命令/代码注入检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="dirscan" value="dirscan">
                                        <label class="custom-control-label" for="dirscan">目录枚举</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="path_traversal" value="path_traversal">
                                        <label class="custom-control-label" for="path_traversal">路径穿越检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="xxe" value="xxe">
                                        <label class="custom-control-label" for="xxe">XML 实体注入检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="phantasm" value="phantasm">
                                        <label class="custom-control-label" for="phantasm">POC 检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="upload" value="upload">
                                        <label class="custom-control-label" for="upload">文件上传检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="brute_force" value="brute_force">
                                        <label class="custom-control-label" for="brute_force">弱口令检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="jsonp" value="jsonp">
                                        <label class="custom-control-label" for="jsonp">jsonp 检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="ssrf" value="ssrf">
                                        <label class="custom-control-label" for="ssrf">ssrf 检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="baseline" value="baseline">
                                        <label class="custom-control-label" for="baseline">基线检查</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="redirect" value="redirect">
                                        <label class="custom-control-label" for="redirect">任意跳转检测</label>
                                    </div>
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" class="custom-control-input" id="crlf_injection" value="crlf_injection">
                                        <label class="custom-control-label" for="crlf_injection">CRLF 注入</label>
                                    </div>
                                </div>

                                <button type="button" id="scan" class="btn btn-primary">扫描</button>

                            </div>
                            <div class="col-md-6">
                                <div class="form-group mb-3">
                                    <label for="outlog">输出日志</label>
                                    <textarea class="form-control" id="outlog" rows="18"></textarea>
                                </div>
                            </div>

                        </div>

                    </div> <!-- end card-body-->
                </div> <!-- end card-->
            </div> <!-- end col -->
        </div>

    </div> <!-- end card body-->
</div>


</body>

<#include "/manage/footer_script.html"/>

</html>